﻿namespace jQube.Web
{
    using System.Configuration;
    using System.Security;
    using System.Security.Permissions;
    using System.Web.Configuration;

    internal class CustomErrorsSectionWrapper : ICustomErrorsSection
    {
        [SecurityCritical()]
        [ConfigurationPermission(SecurityAction.Assert, Unrestricted = true)]
        public CustomErrorsSectionWrapper()
        {
            this.CustomErrorsSection = WebConfigurationManager.GetSection("system.web/customErrors") as CustomErrorsSection;
        }

        public CustomErrorsSection CustomErrorsSection { get; private set; }

        #region Miembros de ICustomErrorsSection
        string ICustomErrorsSection.DefaultRedirect
        {
            get { return this.CustomErrorsSection.DefaultRedirect; }
        }

        CustomErrorCollection ICustomErrorsSection.Errors
        {
            get { return this.CustomErrorsSection.Errors; }
        }
        #endregion
    }
}
